<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   DeepID算法实践  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/23728.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466461159: Accept with keywords: (title(0.333333333333):算法,数盟,社区, topn(0.4):社区,数盟,行业资讯,神经网络,文件夹,人脸,数据挖掘,文件,结果,人工智能,论文,职业规划,卷积,参数,文章,基础架构,数据,向量,结构,视频,python,图像,正确率,算法,类别,部分,代码,程序,模块,图片).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    DeepID算法实践
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    DeepID算法实践 | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,57] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech/ai">
       人工智能
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/23728.html">
          DeepID算法实践
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          919 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech/ai" rel="category tag">
          人工智能
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <h1 id="deepid实践">
       </h1>
       <p>
        作者CSDN张雨石   原文链接：
        <a href="http://blog.csdn.net/stdcoutzyx/article/details/45570221">
         http://blog.csdn.net/stdcoutzyx/article/details/45570221
        </a>
       </p>
       <p>
        好久没有写博客了，I have failed my blog. 目前人脸验证算法可以说是DeepID最强，本文使用theano对DeepID进行实现。关于deepid的介绍，可以参见我这一片博文
        <a href="http://blog.csdn.net/stdcoutzyx/article/details/42091205">
         DeepID之三代
        </a>
        。
       </p>
       <p>
        当然DeepID最强指的是DeepID和联合贝叶斯两个算法，本文中只实现了DeepID神经网络，并用它作为特征提取器来应用在其他任务上。
       </p>
       <p>
        本文所用到的代码工程在github上：
        <a href="https://github.com/stdcoutzyx/DeepID_FaceClassify">
         DeepID_FaceClassify
        </a>
        ，如果这篇博客帮到了你，求star。咳咳，为了github工程的star数我觉得我太无耻了，哈哈。
       </p>
       <h1 id="实践流程">
        <p name="t1">
        </p>
        实践流程
       </h1>
       <h2 id="环境配置">
        <p name="t2">
        </p>
        环境配置
       </h2>
       <p>
        本工程使用theano库，所以在实验之前，theano环境是必须要配的，theano环境配置可以参见
        <a href="http://deeplearning.net/software/theano/install.html#install">
         theano document
        </a>
        。文档已经较为全面，本文不再赘述，在下文中，均假设读者已经装好了theano。
       </p>
       <h2 id="代码概览">
        <p name="t3">
        </p>
        代码概览
       </h2>
       <p>
        本文所用到的代码结构如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be5316c5942550165" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          src/
├── conv_net
│   ├── deepid_class.py
│   ├── deepid_generate.py
│   ├── layers.py
│   ├── load_data.py
│   └── sample_optimization.py
└── data_prepare
    ├── vectorize_img.py
    ├── youtube_data_split.py
    └── youtube_img_crop.py
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be5316c5942550165-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316c5942550165-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686be5316c5942550165-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316c5942550165-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686be5316c5942550165-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316c5942550165-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686be5316c5942550165-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316c5942550165-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686be5316c5942550165-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316c5942550165-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686be5316c5942550165-11">
               11
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be5316c5942550165-1">
               <span class="crayon-v">
                src
               </span>
               <span class="crayon-o">
                /
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316c5942550165-2">
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                conv
               </span>
               <span class="crayon-sy">
                _
               </span>
               net
              </div>
              <div class="crayon-line" id="crayon-57686be5316c5942550165-3">
               │
               <span class="crayon-h">
               </span>
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                deepid_class
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                py
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316c5942550165-4">
               │
               <span class="crayon-h">
               </span>
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                deepid_generate
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                py
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be5316c5942550165-5">
               │
               <span class="crayon-h">
               </span>
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                layers
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                py
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316c5942550165-6">
               │
               <span class="crayon-h">
               </span>
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                load_data
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                py
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be5316c5942550165-7">
               │
               <span class="crayon-h">
               </span>
               └──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sample_optimization
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                py
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316c5942550165-8">
               └──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                data
               </span>
               <span class="crayon-sy">
                _
               </span>
               prepare
              </div>
              <div class="crayon-line" id="crayon-57686be5316c5942550165-9">
               <span class="crayon-h">
               </span>
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                vectorize_img
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                py
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316c5942550165-10">
               <span class="crayon-h">
               </span>
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                youtube_data_split
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                py
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be5316c5942550165-11">
               <span class="crayon-h">
               </span>
               └──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                youtube_img_crop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                py
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0120 seconds] -->
       <p>
        正如文件名命名所指出的，代码共分为两个模块，即数据准备模块（
        <code>
         data_prepare
        </code>
        ）和卷积神经网络模块（
        <code>
         conv_net
        </code>
        ）。
       </p>
       <h2 id="数据准备">
        <p name="t4">
        </p>
        数据准备
       </h2>
       <p>
        我觉得DeepID的强大得益于两个因素，卷积神经网络的结构和数据，数据对于DeepID或者说对任何的卷积神经网络都非常重要。
       </p>
       <p>
        可惜的是，我去找过论文作者要过数据，可是被婉拒。所以在本文的实验中，我使用的数据并非论文中的数据。经过下面的描述你可以知道，如果你还有其他的数据，可以很轻松的用
        <a class="replace_word" href="http://lib.csdn.net/base/11" target="_blank" title="Python知识库">
         Python
        </a>
        将其处理为本文DeepID网络的输入数据。
       </p>
       <p>
        以youtube face数据为例。它的文件夹结构如下所示，包含三级结构，第一是以人为单位，然后每个人有不同的视频，每个视频中采集出多张人脸图像。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be5316d8965129088" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          youtube_data/
├── people_folderA
│   ├── video_folderA
│   │   ├── img1.jpg
│   │   ├── img2.jpg
│   │   └── imgN.jpg
│   └── video_folderB
└── people_folderB
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be5316d8965129088-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316d8965129088-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686be5316d8965129088-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316d8965129088-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686be5316d8965129088-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316d8965129088-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686be5316d8965129088-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316d8965129088-8">
               8
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be5316d8965129088-1">
               <span class="crayon-v">
                youtube_data
               </span>
               <span class="crayon-o">
                /
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316d8965129088-2">
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                people
               </span>
               <span class="crayon-sy">
                _
               </span>
               folderA
              </div>
              <div class="crayon-line" id="crayon-57686be5316d8965129088-3">
               │
               <span class="crayon-h">
               </span>
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                video
               </span>
               <span class="crayon-sy">
                _
               </span>
               folderA
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316d8965129088-4">
               │
               <span class="crayon-h">
               </span>
               │
               <span class="crayon-h">
               </span>
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                img1
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                jpg
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be5316d8965129088-5">
               │
               <span class="crayon-h">
               </span>
               │
               <span class="crayon-h">
               </span>
               ├──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                img2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                jpg
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316d8965129088-6">
               │
               <span class="crayon-h">
               </span>
               │
               <span class="crayon-h">
               </span>
               └──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                imgN
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                jpg
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be5316d8965129088-7">
               │
               <span class="crayon-h">
               </span>
               └──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                video
               </span>
               <span class="crayon-sy">
                _
               </span>
               folderB
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316d8965129088-8">
               └──
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                people_folderB
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0165 seconds] -->
       <p>
        拿到youtube face数据以后，需要做如下两件事：
       </p>
       <ul>
        <li>
         对图像进行预处理，原来的youtube face图像中，人脸只占中间很小的一部分，我们对其进行裁剪，使人脸的比例变大。同时，将图像缩放为(47,55)大小。
        </li>
        <li>
         将数据集合划分为训练集和验证集。本文中划分训练集和验证集的方式如下：
         <ul>
          <li>
           对于每一个人，将其不同视频下的图像混合在一起
          </li>
          <li>
           随机化
          </li>
          <li>
           选择前5张作为验证集，第6-25张作为训练集。
          </li>
         </ul>
        </li>
       </ul>
       <p>
        经过划分后，得到7975张验证集和31900训练集。显然，根据这两个数字你可以算出一共有1595个类（人）。
       </p>
       <h2 id="数据准备的代码使用">
        <p name="t5">
        </p>
        数据准备的代码使用
       </h2>
       <p>
        <strong>
         注意:
        </strong>
        数据准备模块中以youtube为前缀的的程序是专门用来处理youtube数据，因为其他数据可能图像属性和文件夹的结构不一样。如果你使用了其他数据，请阅读
        <code>
         youtube_img_crop.py
        </code>
        和
        <code>
         youtube_data_split.py
        </code>
        代码，然后重新写出适合自己数据的代码。数据预处理代码都很简单，相信在我代码的基础上，不需要改太多，就能适应另一种数据了。
       </p>
       <h3 id="youtubeimgcroppy">
        <p name="t6">
        </p>
        youtube_img_crop.py
       </h3>
       <p>
        被用来裁剪图片，youtube face数据中图像上人脸的比例都相当小，本程序用于将图像的边缘裁减掉，然后将图像缩放为47×55（DeepID的输入图像大小）。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be5316e1265751654" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          Usage: python youtube_img_crop.py aligned_db_folder new_folder
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be5316e1265751654-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316e1265751654-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be5316e1265751654-1">
               <span class="crayon-v">
                Usage
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                python
               </span>
               <span class="crayon-v">
                youtube_img_crop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                py
               </span>
               <span class="crayon-e">
                aligned_db_folder
               </span>
               <span class="crayon-v">
                new
               </span>
               <span class="crayon-sy">
                _
               </span>
               folder
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316e1265751654-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0009 seconds] -->
       <p>
       </p>
       <ul>
        <li>
         aligned_db_folder: 原始文件夹
        </li>
        <li>
         new_folder: 结果文件夹，与原始文件夹的文件夹结构一样，只不过图像是被处理后的图像。
        </li>
       </ul>
       <h4 id="youtubedatasplitpy">
        <p name="t7">
        </p>
        youtube_data_split.py
       </h4>
       <p>
        用来切分数据，将数据分为训练集和验证集。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be5316e7936473596" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          Usage: python youtube_data_split.py src_folder test_set_file train_set_file
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be5316e7936473596-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316e7936473596-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be5316e7936473596-1">
               <span class="crayon-v">
                Usage
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                python
               </span>
               <span class="crayon-v">
                youtube_data_split
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                py
               </span>
               <span class="crayon-e">
                src_folder
               </span>
               <span class="crayon-e">
                test_set_file
               </span>
               <span class="crayon-v">
                train_set
               </span>
               <span class="crayon-sy">
                _
               </span>
               file
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316e7936473596-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0161 seconds] -->
       <p>
       </p>
       <ul>
        <li>
         src_folder: 原始文件夹，此处应该为上一步得到的新文件夹
        </li>
        <li>
         test_set_file: 验证集图片路径集合文件
        </li>
        <li>
         train_set_file: 训练集图片路径集合文件
        </li>
       </ul>
       <p>
        <code>
         test_set_file
        </code>
        和
        <code>
         train_set_file
        </code>
        的格式如下，每一行分为两部分，第一部分是图像路径，第二部分是图像的类别标记。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be5316ee189551165" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          youtube_47_55/Alan_Ball/2/aligned_detect_2.405.jpg,0
youtube_47_55/Alan_Ball/2/aligned_detect_2.844.jpg,0
youtube_47_55/Xiang_Liu/5/aligned_detect_5.1352.jpg,1
youtube_47_55/Xiang_Liu/1/aligned_detect_1.482.jpg,1
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be5316ee189551165-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316ee189551165-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686be5316ee189551165-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316ee189551165-4">
               4
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be5316ee189551165-1">
               <span class="crayon-v">
                youtube_47_55
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                Alan_Ball
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                aligned_detect_2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                405.jpg
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-cn">
                0
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316ee189551165-2">
               <span class="crayon-v">
                youtube_47_55
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                Alan_Ball
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                aligned_detect_2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                844.jpg
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-cn">
                0
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be5316ee189551165-3">
               <span class="crayon-v">
                youtube_47_55
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                Xiang_Liu
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                aligned_detect_5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                1352.jpg
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316ee189551165-4">
               <span class="crayon-v">
                youtube_47_55
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                Xiang_Liu
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                aligned_detect_1
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                482.jpg
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0020 seconds] -->
       <p>
       </p>
       <h3 id="vectorizeimgpy">
        <p name="t8">
        </p>
        vectorize_img.py
       </h3>
       <p>
        用来将图像向量化，每张图像都是47×55的，所以每张图片变成一个47×55×3的向量。
       </p>
       <p>
        为了避免超大文件的出现，本程序自动将数据切分为小文件，每个小文件中只有1000张图片，即1000×(47×55×3)的矩阵。当然，最后一个小文件不一定是1000张。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be5316f4105888576" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          Usage: python vectorize_img.py test_set_file train_set_file test_vector_folder train_vector_folder
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be5316f4105888576-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316f4105888576-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be5316f4105888576-1">
               <span class="crayon-v">
                Usage
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                python
               </span>
               <span class="crayon-v">
                vectorize_img
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                py
               </span>
               <span class="crayon-e">
                test_set_file
               </span>
               <span class="crayon-e">
                train_set_file
               </span>
               <span class="crayon-e">
                test_vector_folder
               </span>
               <span class="crayon-v">
                train_vector
               </span>
               <span class="crayon-sy">
                _
               </span>
               folder
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316f4105888576-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0010 seconds] -->
       <p>
       </p>
       <ul>
        <li>
         test_set_file:
         <code>
          *_data_split.py
         </code>
         生成的
        </li>
        <li>
         train_set_file:
         <code>
          *_ata_split.py
         </code>
         生成的
        </li>
        <li>
         test_vector_folder: 存储验证集向量文件的文件夹名称
        </li>
        <li>
         train_vector_folder: 存储训练集向量文件的文件夹名称
        </li>
       </ul>
       <h2 id="convnet">
        <p name="t9">
        </p>
        Conv_Net
       </h2>
       <p>
        走完了漫漫前路，终于可以直捣黄龙了。现在是DeepID时间。吼吼哈嘿。
       </p>
       <p>
        在conv_net模块中，有五个程序文件
       </p>
       <ul>
        <li>
         layers.py: 卷积神经网络相关的各种层次的定义，包括逻辑斯底回归层、隐含层、卷积层、max_pooling层等
        </li>
        <li>
         load_data.py: 为DeepID载入数据。
        </li>
        <li>
         sample_optimization.py: 针对各种层次的一些测试实验。
        </li>
        <li>
         deepid_class.py: DeepID主程序
        </li>
        <li>
         deepid_generate.py: 根据DeepID训练好的参数，来将隐含层抽取出来
        </li>
       </ul>
       <h2 id="convnet代码使用">
        <p name="t10">
        </p>
        Conv_Net代码使用
       </h2>
       <h3 id="deepidclasspy">
        <p name="t11">
        </p>
        deepid_class.py
       </h3>
       <p>
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be5316fb383356691" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          Usage: python deepid_class.py vec_valid vec_train params_file
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be5316fb383356691-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be5316fb383356691-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be5316fb383356691-1">
               <span class="crayon-v">
                Usage
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                python
               </span>
               <span class="crayon-v">
                deepid_class
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                py
               </span>
               <span class="crayon-e">
                vec_valid
               </span>
               <span class="crayon-e">
                vec_train
               </span>
               <span class="crayon-v">
                params
               </span>
               <span class="crayon-sy">
                _
               </span>
               file
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be5316fb383356691-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0070 seconds] -->
       <p>
       </p>
       <ul>
        <li>
         vec_valid:
         <code>
          vectorize_img.py
         </code>
         生成的
        </li>
        <li>
         vec_train:
         <code>
          vectorize_img.py
         </code>
         生成的
        </li>
        <li>
         params_file: 用来存储训练时每次迭代的参数，可以被用来断点续跑，由于CNN程序一般需要较长时间，万一遇到停电啥的，就可以用得上了。自然，更大的用途是保存参数后用来抽取特征。
        </li>
       </ul>
       <p>
        <strong>
         注意:
        </strong>
       </p>
       <p>
        DeepID训练过程有太多的参数需要调整，为了程序使用简便，我并没有把这些参数都使用命令行传参。如果你想要改变迭代次数、学习速率、批大小等参数，请在程序的最后一行调用函数里改。
       </p>
       <h3 id="deepidgeneratepy">
        <p name="t12">
        </p>
        deepid_generate.py
       </h3>
       <p>
        可以使用下面的命令来抽取DeepID的隐含层，即160-d的那一层。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be531701166359711" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          Usage: python deepid_generate.py dataset_folder params_file result_folder
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be531701166359711-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531701166359711-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be531701166359711-1">
               <span class="crayon-v">
                Usage
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                python
               </span>
               <span class="crayon-v">
                deepid_generate
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                py
               </span>
               <span class="crayon-e">
                dataset_folder
               </span>
               <span class="crayon-e">
                params_file
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-sy">
                _
               </span>
               folder
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531701166359711-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0090 seconds] -->
       <p>
       </p>
       <ul>
        <li>
         dataset_folder: 可以是训练集向量文件夹或者验证集向量文件夹。
        </li>
        <li>
         params_file:
         <code>
          deepid_class.py
         </code>
         训练得到
        </li>
        <li>
         result_folder: 结果文件夹，其下的文件与dataset_folder中文件的文件名一一对应，但是结果文件夹中的向量的长度变为160而不是原来的7755。
        </li>
       </ul>
       <h1 id="效果展示">
        <p name="t13">
        </p>
        效果展示
       </h1>
       <h2 id="deepid-效果">
        <p name="t14">
        </p>
        DeepID 效果
       </h2>
       <p>
        跑完
        <code>
         deepid_class.py
        </code>
        以后，你可以得到输出如下。输出可以分为两部分，第一部分是每次迭代以及每个小batch的训练集误差，验证集误差等。第二部分是一个汇总，将
        <code>
         epoch train error valid error
        </code>
        . 按照统一格式打印了出来。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be531708985991338" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          epoch 15, train_score 0.000444, valid_score 0.066000
        epoch 16, minibatch_index 62/63, error 0.000000
epoch 16, train_score 0.000413, valid_score 0.065733
        epoch 17, minibatch_index 62/63, error 0.000000
epoch 17, train_score 0.000508, valid_score 0.065333
        epoch 18, minibatch_index 62/63, error 0.000000
epoch 18, train_score 0.000413, valid_score 0.070267
        epoch 19, minibatch_index 62/63, error 0.000000
epoch 19, train_score 0.000413, valid_score 0.064533

0 0.974349206349 0.962933333333
1 0.890095238095 0.897466666667
2 0.70126984127 0.666666666667
3 0.392031746032 0.520133333333
4 0.187619047619 0.360666666667
5 0.20526984127 0.22
6 0.054380952381 0.171066666667
7 0.0154920634921 0.128
8 0.00650793650794 0.100133333333
9 0.00377777777778 0.0909333333333
10 0.00292063492063 0.086
11 0.0015873015873 0.0792
12 0.00133333333333 0.0754666666667
13 0.00111111111111 0.0714666666667
14 0.000761904761905 0.068
15 0.000444444444444 0.066
16 0.000412698412698 0.0657333333333
17 0.000507936507937 0.0653333333333
18 0.000412698412698 0.0702666666667
19 0.000412698412698 0.0645333333333
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be531708985991338-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-28">
               28
              </div>
              <div class="crayon-num" data-line="crayon-57686be531708985991338-29">
               29
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be531708985991338-30">
               30
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be531708985991338-1">
               <span class="crayon-i">
                epoch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                15
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                train
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000444
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                valid
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.066000
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-2">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                epoch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                16
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                minibatch
               </span>
               <span class="crayon-sy">
                _
               </span>
               index
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                62
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                63
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                error
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000000
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-3">
               <span class="crayon-i">
                epoch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                16
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                train
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000413
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                valid
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.065733
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                epoch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                17
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                minibatch
               </span>
               <span class="crayon-sy">
                _
               </span>
               index
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                62
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                63
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                error
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000000
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-5">
               <span class="crayon-i">
                epoch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                17
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                train
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000508
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                valid
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.065333
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                epoch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                18
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                minibatch
               </span>
               <span class="crayon-sy">
                _
               </span>
               index
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                62
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                63
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                error
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000000
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-7">
               <span class="crayon-i">
                epoch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                18
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                train
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000413
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                valid
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.070267
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                epoch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                19
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                minibatch
               </span>
               <span class="crayon-sy">
                _
               </span>
               index
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                62
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                63
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                error
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000000
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-9">
               <span class="crayon-i">
                epoch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                19
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                train
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000413
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                valid
               </span>
               <span class="crayon-sy">
                _
               </span>
               score
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.064533
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-10">
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-11">
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.974349206349
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.962933333333
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-12">
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.890095238095
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.897466666667
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-13">
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.70126984127
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.666666666667
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-14">
               <span class="crayon-cn">
                3
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.392031746032
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.520133333333
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-15">
               <span class="crayon-cn">
                4
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.187619047619
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.360666666667
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-16">
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.20526984127
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.22
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-17">
               <span class="crayon-cn">
                6
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.054380952381
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.171066666667
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-18">
               <span class="crayon-cn">
                7
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0154920634921
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.128
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-19">
               <span class="crayon-cn">
                8
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.00650793650794
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.100133333333
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-20">
               <span class="crayon-cn">
                9
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.00377777777778
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0909333333333
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-21">
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.00292063492063
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.086
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-22">
               <span class="crayon-cn">
                11
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0015873015873
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0792
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-23">
               <span class="crayon-cn">
                12
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.00133333333333
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0754666666667
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-24">
               <span class="crayon-cn">
                13
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.00111111111111
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0714666666667
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-25">
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000761904761905
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.068
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-26">
               <span class="crayon-cn">
                15
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000444444444444
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.066
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-27">
               <span class="crayon-cn">
                16
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000412698412698
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0657333333333
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-28">
               <span class="crayon-cn">
                17
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000507936507937
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0653333333333
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be531708985991338-29">
               <span class="crayon-cn">
                18
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000412698412698
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0702666666667
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be531708985991338-30">
               <span class="crayon-cn">
                19
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.000412698412698
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0.0645333333333
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0313 seconds] -->
       <p>
        上述数据画成折线图如下：
       </p>
       <p>
        <img src="https://raw.githubusercontent.com/stdcoutzyx/DeepID_FaceClassify/master/doc/error_rate_deepid_youtubeface.png"/>
       </p>
       <h2 id="向量抽取效果展示">
        <p name="t15">
        </p>
        向量抽取效果展示
       </h2>
       <p>
        运行
        <code>
         deepid_generate.py
        </code>
        之后, 可以得到输出如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686be53170f515142795" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          loading data of vec_test/0.pkl
    building the model ...
    generating ...
    writing data to deepid_test/0.pkl
loading data of vec_test/3.pkl
    building the model ...
    generating ...
    writing data to deepid_test/3.pkl
loading data of vec_test/1.pkl
    building the model ...
    generating ...
    writing data to deepid_test/1.pkl
loading data of vec_test/7.pkl
    building the model ...
    generating ...
    writing data to deepid_test/7.pkl
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686be53170f515142795-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be53170f515142795-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686be53170f515142795-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be53170f515142795-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686be53170f515142795-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be53170f515142795-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686be53170f515142795-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be53170f515142795-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686be53170f515142795-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be53170f515142795-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686be53170f515142795-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be53170f515142795-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57686be53170f515142795-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be53170f515142795-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57686be53170f515142795-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686be53170f515142795-16">
               16
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686be53170f515142795-1">
               <span class="crayon-e">
                loading
               </span>
               <span class="crayon-e">
                data
               </span>
               <span class="crayon-e">
                of
               </span>
               <span class="crayon-v">
                vec_test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                0.pkl
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be53170f515142795-2">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                building
               </span>
               <span class="crayon-e">
                the
               </span>
               <span class="crayon-i">
                model
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be53170f515142795-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                generating
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be53170f515142795-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                writing
               </span>
               <span class="crayon-e">
                data
               </span>
               <span class="crayon-st">
                to
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                deepid_test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                0.pkl
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be53170f515142795-5">
               <span class="crayon-e">
                loading
               </span>
               <span class="crayon-e">
                data
               </span>
               <span class="crayon-e">
                of
               </span>
               <span class="crayon-v">
                vec_test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                3.pkl
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be53170f515142795-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                building
               </span>
               <span class="crayon-e">
                the
               </span>
               <span class="crayon-i">
                model
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be53170f515142795-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                generating
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be53170f515142795-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                writing
               </span>
               <span class="crayon-e">
                data
               </span>
               <span class="crayon-st">
                to
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                deepid_test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                3.pkl
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be53170f515142795-9">
               <span class="crayon-e">
                loading
               </span>
               <span class="crayon-e">
                data
               </span>
               <span class="crayon-e">
                of
               </span>
               <span class="crayon-v">
                vec_test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                1.pkl
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be53170f515142795-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                building
               </span>
               <span class="crayon-e">
                the
               </span>
               <span class="crayon-i">
                model
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be53170f515142795-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                generating
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be53170f515142795-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                writing
               </span>
               <span class="crayon-e">
                data
               </span>
               <span class="crayon-st">
                to
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                deepid_test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                1.pkl
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be53170f515142795-13">
               <span class="crayon-e">
                loading
               </span>
               <span class="crayon-e">
                data
               </span>
               <span class="crayon-e">
                of
               </span>
               <span class="crayon-v">
                vec_test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                7.pkl
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be53170f515142795-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                building
               </span>
               <span class="crayon-e">
                the
               </span>
               <span class="crayon-i">
                model
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686be53170f515142795-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                generating
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686be53170f515142795-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                writing
               </span>
               <span class="crayon-e">
                data
               </span>
               <span class="crayon-st">
                to
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                deepid_test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                7.pkl
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0145 seconds] -->
       <p>
        程序会对向量化文件夹内的每一个文件进行抽取操作，得到对应的160-d向量化文件。
       </p>
       <p>
        将隐含层抽取出来后，我们可以在一些其他领域上验证该特征的有效性，比如图像检索。可以使用我的另一个github工程进行测试，
        <a href="https://github.com/stdcoutzyx/FaceRetrieval">
         这是链接
        </a>
        .使用验证集做查询集，训练集做被查询集，来看一下检索效果如何。
       </p>
       <p>
        为了做对比，本文在youtube face数据上做了两个人脸检索实验。
       </p>
       <ul>
        <li>
         PCA exp. 在
         <code>
          vectorized_img.py
         </code>
         生成的数据上，使用PCA将特征降到160-d，然后进行人脸检索实验。
        </li>
        <li>
         DeepID exp. 在
         <code>
          deepid_generate.py
         </code>
         生成的160-d数据上直接进行人脸检索实验。
        </li>
       </ul>
       <p>
        <strong>
         注意:
        </strong>
        在两个实验中，我都使用cosine相似度计算距离，之前做过很多实验，cosine距离比欧式距离要好。
       </p>
       <p>
        人脸检索结果如下：
       </p>
       <ul>
        <li>
         正确率如下：
        </li>
       </ul>
       <table>
        <thead>
         <tr>
          <th>
           Precision
          </th>
          <th>
           Top-1
          </th>
          <th>
           Top-5
          </th>
          <th>
           Top-10
          </th>
         </tr>
        </thead>
        <tbody>
         <tr>
          <td>
           PCA
          </td>
          <td>
           95.20%
          </td>
          <td>
           96.75%
          </td>
          <td>
           97.22%
          </td>
         </tr>
         <tr>
          <td>
           DeepID
          </td>
          <td>
           97.27%
          </td>
          <td>
           97.93%
          </td>
          <td>
           98.25%
          </td>
         </tr>
        </tbody>
       </table>
       <ul>
        <li>
         平均正确率如下：
        </li>
       </ul>
       <table>
        <thead>
         <tr>
          <th>
           AP
          </th>
          <th>
           Top-1
          </th>
          <th>
           Top-5
          </th>
          <th>
           Top-10
          </th>
         </tr>
        </thead>
        <tbody>
         <tr>
          <td>
           PCA
          </td>
          <td>
           95.20%
          </td>
          <td>
           84.19%
          </td>
          <td>
           70.66%
          </td>
         </tr>
         <tr>
          <td>
           DeepID
          </td>
          <td>
           97.27%
          </td>
          <td>
           89.22%
          </td>
          <td>
           76.64%
          </td>
         </tr>
        </tbody>
       </table>
       <p>
        Precision意味着在top-N结果中只要出现相同类别的人，就算这次查询成功，否则失败。而AP则意味着，在top-N结果中需要统计与查询图片相同类别的图片有多少张，然后除以N，是这次查询的准确率，然后再求平均。
       </p>
       <p>
        从结果中可以看到，在相同维度下，DeepID在信息的表达上还是要强于PCA的。
       </p>
       <h1 id="参考文献">
        <p name="t16">
        </p>
        参考文献
       </h1>
       <p>
        [1]. Sun Y, Wang X, Tang X. Deep learning face representation from predicting 10,000 classes[C]//Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on. IEEE, 2014: 1891-1898.
       </p>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/24663.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/095356be8cb4z9ke9389kd-204x200.jpeg"/>
        </a>
        <a class="link" href="http://dataunion.org/24663.html" rel="bookmark" title="人工智能界最强大脑畅谈AI未来之路">
         人工智能界最强大脑畅谈AI未来之路
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24652.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/02/20150522141422337-265x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24652.html" rel="bookmark" title="重磅 | MIT与谷歌专家合著论文：机器学习和神经科学的相互启发与融合（附论文）">
         重磅 | MIT与谷歌专家合著论文：机器学习和神经科学的相互启发与融合（附论文）
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24616.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/224806wllbe6tcimyyi9xt-300x167.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24616.html" rel="bookmark" title="微软人工智能计划背后的华人力量">
         微软人工智能计划背后的华人力量
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24562.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/8aac7ceb921d1684f06e6f65e2c1f224-300x173.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24562.html" rel="bookmark" title="各位大佬，别再拿人工智能当春药了！">
         各位大佬，别再拿人工智能当春药了！
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F23728.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/23728.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/23728.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>